package com.xyy.kingdeek3cloud.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

@NoArgsConstructor
@Data
public class SaveOrderDto {

    @JsonProperty("NeedUpDateFields")
    private List<?> needUpDateFields;
    @JsonProperty("NeedReturnFields")
    private List<?> needReturnFields;
    @JsonProperty("IsDeleteEntry")
    private String isDeleteEntry;
    @JsonProperty("SubSystemId")
    private String subSystemId;
    @JsonProperty("IsVerifyBaseDataField")
    private Boolean isVerifyBaseDataField;
    @JsonProperty("IsEntryBatchFill")
    private Boolean isEntryBatchFill;
    @JsonProperty("ValidateFlag")
    private String validateFlag;
    @JsonProperty("NumberSearch")
    private String numberSearch;
    @JsonProperty("IsAutoAdjustField")
    private Boolean isAutoAdjustField;
    @JsonProperty("InterationFlags")
    private String interationFlags;
    @JsonProperty("IgnoreInterationFlag")
    private String ignoreInterationFlag;
    @JsonProperty("IsControlPrecision")
    private String isControlPrecision;
    @JsonProperty("ValidateRepeatJson")
    private String validateRepeatJson;
    @JsonProperty("Model")
    private ModelDTO model;

    @NoArgsConstructor
    @Data
    public static class ModelDTO {
        @JsonProperty("FID")
        private Integer fid;
        @JsonProperty("FBillTypeID")
        private FBillTypeIDDTO fBillTypeID;
        @JsonProperty("FBillNo")
        private String fBillNo;
        @JsonProperty("FDate")
        private String fDate;
        @JsonProperty("FCustId")
        private FCustIdDTO fCustId;
        @JsonProperty("FReceiveId")
        private FReceiveIdDTO fReceiveId;
        @JsonProperty("FSettleId")
        private FSettleIdDTO fSettleId;
        @JsonProperty("FChargeId")
        private FChargeIdDTO fChargeId;
        @JsonProperty("FISINIT")
        private Boolean fisinit;
        @JsonProperty("FIsMobile")
        private Boolean fIsMobile;
        @JsonProperty("FIsUseOEMBomPush")
        private Boolean fIsUseOEMBomPush;
        @JsonProperty("FIsUseDrpSalePOPush")
        private Boolean fIsUseDrpSalePOPush;
        @JsonProperty("FIsCreateStraightOutIN")
        private Boolean fIsCreateStraightOutIN;
        @JsonProperty("FSaleOrderFinance")
        private FSaleOrderFinanceDTO fSaleOrderFinance;
        @JsonProperty("FSaleOrderEntry")
        private List<FSaleOrderEntryDTO> fSaleOrderEntry;
        @JsonProperty("FSaleOrderPlan")
        private List<FSaleOrderPlanDTO> fSaleOrderPlan;
        @JsonProperty("FSalerId")
        private FSalerIdDTO fSalerId;
        @JsonProperty("FSaleOrgId")
        private FSaleOrgIdDTO fSaleOrgId;
        @JsonProperty("FLinkPhone")
        private String fLinkPhone;
        @JsonProperty("FLinkMan")
        private String fLinkMan;
        @JsonProperty("FReceiveAddress")
        private String fReceiveAddress;
        @JsonProperty("FNetOrderBillNo")
        private String fNetOrderBillNo;
        @JsonProperty("FNetOrderBillNo")
        private String fNetOrderBillId;
        @JsonProperty("FNote")
        private String fNote;
        @JsonProperty("FSOFrom")
        private String fSOFrom;
        @JsonProperty("F_KBL_Text")
        private String F_KBL_Text;


        @NoArgsConstructor
        @Data
        @AllArgsConstructor
        public static class FBillTypeIDDTO {
            @JsonProperty("FNUMBER")
            private String fnumber;
        }

        @NoArgsConstructor
        @Data
        @AllArgsConstructor
        public static class FSaleOrgIdDTO {
            @JsonProperty("FNUMBER")
            private String fnumber;
        }


        @NoArgsConstructor
        @Data
        @AllArgsConstructor
        public static class FCustIdDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        @AllArgsConstructor
        public static class FReceiveIdDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        @AllArgsConstructor
        public static class FSettleIdDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        @AllArgsConstructor
        public static class FChargeIdDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        @AllArgsConstructor
        public static class FSalerIdDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        public static class FSaleOrderFinanceDTO {
            @JsonProperty("FSettleCurrId")
            private FSettleCurrIdDTO fSettleCurrId;
            @JsonProperty("FIsPriceExcludeTax")
            private Boolean fIsPriceExcludeTax;
            @JsonProperty("FIsIncludedTax")
            private Boolean fIsIncludedTax;
            @JsonProperty("FExchangeTypeId")
            private FExchangeTypeIdDTO fExchangeTypeId;
            @JsonProperty("FOverOrgTransDirect")
            private Boolean fOverOrgTransDirect;

            @NoArgsConstructor
            @Data
            public static class FSettleCurrIdDTO {
                @JsonProperty("FNumber")
                private String fNumber;
            }

            @NoArgsConstructor
            @Data
            public static class FExchangeTypeIdDTO {
                @JsonProperty("FNumber")
                private String fNumber;
            }
        }

        @NoArgsConstructor
        @Data
        public static class FSaleOrderEntryDTO {
            @JsonProperty("FRowType")
            private String fRowType;
            @JsonProperty("FMaterialId")
            private FMaterialIdDTO fMaterialId;
            @JsonProperty("FUnitID")
            private FUnitIDDTO fUnitID;
            @JsonProperty("FQty")
            private BigDecimal fQty;
            @JsonProperty("FPriceUnitId")
            private FPriceUnitIdDTO fPriceUnitId;
            @JsonProperty("FIsFree")
            private Boolean fIsFree;
            @JsonProperty("FEntryTaxRate")
            private Integer fEntryTaxRate;
            @JsonProperty("FDeliveryDate")
            private String fDeliveryDate;
            @JsonProperty("FOwnerTypeId")
            private String fOwnerTypeId;
            @JsonProperty("FOwnerId")
            private FOwnerIdDTO fOwnerId;
            @JsonProperty("FReserveType")
            private String fReserveType;
            @JsonProperty("FPriceBaseQty")
            private Integer fPriceBaseQty;
            @JsonProperty("FStockUnitID")
            private FStockUnitIDDTO fStockUnitID;
            @JsonProperty("FStockQty")
            private Integer fStockQty;
            @JsonProperty("FStockBaseQty")
            private Integer fStockBaseQty;
            @JsonProperty("FOUTLMTUNIT")
            private String foutlmtunit;
            @JsonProperty("FOutLmtUnitID")
            private FOutLmtUnitIDDTO fOutLmtUnitID;
            @JsonProperty("FISMRP")
            private Boolean fismrp;
            @JsonProperty("F_URYX_Assistant1")
            private FURYXAssistant1DTO fUryxAssistant1;
            @JsonProperty("FOrderEntryPlan")
            private List<FOrderEntryPlanDTO> fOrderEntryPlan;
            @JsonProperty("FSettleOrgIds")
            private FSettleOrgIdsDTO fSettleOrgIds;
            @JsonProperty("FTaxPrice")
            private BigDecimal FTaxPrice;
            @JsonProperty("FSrcBillNo")
            private String fSrcBillNo;
            @JsonProperty("FEntryNote")
            private String fEntryNote;
            @JsonProperty("F_KBL_Text1")
            private String F_KBL_Text1;
            @JsonProperty("FAuxPropId")
            private FAuxPropIdDTO fAuxPropId;
            @JsonProperty("FLot")
            private FLotDTO FLot;
            @JsonProperty("FProduceDate")
            private String FProduceDate;
            @JsonProperty("FExpiryDate")
            private String FExpiryDate;


            @NoArgsConstructor
            @Data
            @AllArgsConstructor
            public static class FLotDTO {
                @JsonProperty("FNumber")
                private String fNumber;
            }


            @NoArgsConstructor
            @Data
            @AllArgsConstructor
            public static class FMaterialIdDTO {
                @JsonProperty("FNumber")
                private String fNumber;
            }

            @NoArgsConstructor
            @Data
            @AllArgsConstructor
            public static class FAuxPropIdDTO {
                @JsonProperty("FAUXPROPID__FF100001")
                private FAUXPROPID__FF100001DTO FAUXPROPID__FF100001;
                @NoArgsConstructor
                @Data
                @AllArgsConstructor
                public static class FAUXPROPID__FF100001DTO {
                    @JsonProperty("FNumber")
                    private String fNumber;
                }
            }


            @NoArgsConstructor
            @Data
            @AllArgsConstructor
            public static class FUnitIDDTO {
                @JsonProperty("FNumber")
                private String fNumber;
            }

            @NoArgsConstructor
            @Data
            @AllArgsConstructor
            public static class FPriceUnitIdDTO {
                @JsonProperty("FNumber")
                private String fNumber;
            }

            @NoArgsConstructor
            @Data
            @AllArgsConstructor
            public static class FSettleOrgIdsDTO {
                @JsonProperty("FNumber")
                private String fNumber;
            }


            @NoArgsConstructor
            @Data
            public static class FOwnerIdDTO {
                @JsonProperty("FNumber")
                private String fNumber;
            }

            @NoArgsConstructor
            @Data
            @AllArgsConstructor
            public static class FStockUnitIDDTO {
                @JsonProperty("FNumber")
                private String fNumber;
            }

            @NoArgsConstructor
            @Data
            public static class FOutLmtUnitIDDTO {
                @JsonProperty("FNumber")
                private String fNumber;
            }

            @NoArgsConstructor
            @Data
            public static class FURYXAssistant1DTO {
                @JsonProperty("FNumber")
                private String fNumber;
            }

            @NoArgsConstructor
            @Data
            public static class FOrderEntryPlanDTO {
                @JsonProperty("FPlanDate")
                private String fPlanDate;
                @JsonProperty("FPlanQty")
                private Integer fPlanQty;
            }
        }

        @NoArgsConstructor
        @Data
        public static class FSaleOrderPlanDTO {
            @JsonProperty("FNeedRecAdvance")
            private Boolean fNeedRecAdvance;
            @JsonProperty("FRecAdvanceRate")
            private Integer fRecAdvanceRate;
            @JsonProperty("FIsOutStockByRecamount")
            private Boolean fIsOutStockByRecamount;
        }
    }
}
